// 此处第二个参数vm，就是我们在页面使用的this，你可以通过vm获取vuex等操作，更多内容详见uView对拦截器的介绍部分：
// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
const http = uni.$u.http
// 此处使用了传入的params参数，一切自定义即可
const getApiL = (data = {}, config) => http.get('/frontend/login/wechat', {params: data,...config});
const postApiL = (params = {}, config) => http.post('/frontend/yard/redeemRecord', params, config);
/**
 * 线下活动 
 */
const activityList = (params = {}, config) => http.post('/frontend/activity/list', params, config);
/**
 * 我的活动
*/
const myActivityList = (params = {}, config) => http.post('/frontend/activity/myActivityList', params, config);
/**
 * 查看活动详情

 */
const getActivityInfo = (data = {}, config) => http.get('/frontend/activity/getActivityInfo', {params: data,...config});
/**
 * 报名活动
 */
const signUp = (params = {}, config) => http.post('/frontend/activity/signUp', params, config);
/**
 * 取消报名 
 */
const cancelSignUp = (params = {}, config) => http.post('/frontend/activity/cancelSignUp', params, config);
/**
 * 个人信息
 */
const userInfo = (data = {}, config) => http.get('/frontend/user/userInfo', {params: data,...config});
/**
 * 修改个人信息
 */
const updateInfo = (params = {}, config) => http.post('/frontend/user/updateInfo', params, config);
/**
 * 领券中心 
 */
const couponCollectionCenter = (params = {}, config) => http.post('/frontend/mall/coupon/couponCollectionCenter', params, config);
/**
 * 我的优惠券
 */
const myCouponList = (params = {}, config) => http.post('/frontend/mall/coupon/myCouponList', params, config);
/**
 * 领券优惠券
 */
const receiveCoupon = (data = {}, config) => http.get('/frontend/mall/coupon/user/receiveCoupon', {params: data,...config});
/**
 * 首页商品列表
 * 
 */
const allProductsList = (params = {}, config) => http.post('/frontend/mall/goods/allProductsList', params, config);
/**
 * 首页轮播
 */
const homeBanner = (params = {}, config) => http.post('/frontend/banner/list', params, config);
/**
 * 隐私协议
 */
const getAgreement = (data = {}, config) => http.get('/frontend/agreement/getAgreement', {params: data,...config});
/**
 * 用户协议
 */
const userAgreement = (data = {}, config) => http.get('/frontend/agreement/userAgreement', {params: data,...config});
/**
 * 新人优惠券
 */
const couponNewPeople = (params = {}, config) => http.post('/frontend/mall/coupon/couponNewPeople', params, config);
/**
 * 会员信息

 */
const getEstateTypeById = (data = {}, config) => http.get('/frontend/estate/type/getEstateTypeById', {params: data,...config});
/**
 * 生成合同
 */
const checkData = (params = {}, config) => http.post('/frontend/mall/manor/master/order/checkData', params, config);
/**
 * 合同签订 
 */
const signContract = (params = {}, config) => http.post('/frontend/pay/signContract', params, config);
/**
 * 线上支付
 */
const payManor = (params = {}, config) => http.post('/frontend/pay/payManor', params, config);
/**
 * 线下支付
 */
const payOffline = (params = {}, config) => http.post('/frontend/mall/manor/master/order/add', params, config);
/**
 * 庄园订单列表
 */
const memberList = (params = {}, config) => http.post('/frontend/mall/manor/master/order/list', params, config);
/**
 * 订单详情 
 */
const frontendOrderDetail = (data = {}, config) => http.get('/frontend/mall/order/frontendOrderDetail', {params: data,...config});
/**
 * 退款原因
 */
const frontendList = (params = {}, config) => http.post('/frontend/mall/refund/reason/frontendList', params, config);
/**
 * 申请退款 
 */
const initiateRefund = (params = {}, config) => http.post('/frontend/mall/order/refund/initiateRefund', params, config);
/**
 * 确认收货
 */
const confirmTakeOver = (data = {}, config) => http.get('/frontend/mall/logistics/confirmTakeOver', {params: data,...config});
/**
 * 物流详情

 */
const getLogisticsInfo = (data = {}, config) => http.get('/frontend/mall/logistics/getLogisticsInfo', {params: data,...config});
/**
 * 个人积分
 */
const rattanStatistics = (data = {}, config) => http.get('/frontend/withdrawalLog/myIntegralStatistics ', {params: data,...config});
/**
 * 个人已提现金额统计 
*/
const withdrawnStatistics = (data = {}, config) => http.get('/frontend/rattan/withdrawnStatistics', {params: data,...config});
/**
 * 提现信息
 */
const frontendRattanDetailList = (params = {}, config) => http.post('/frontend/withdrawalLog/myWithdrawalLogList ', params, config);
/**
 * 流水收益
 */
const partIncomeList = (params = {}, config) => http.post('/frontend/withdrawalLog/partIncomeList', params, config);
/**
 * 积分提现
 */
const addWithdrawalLog = (params = {}, config) => http.post('/frontend/user/addWithdrawalLog', params, config);
/**
 * 邀请码
 */
const getQRCode = (params = {}, config) => http.post('/frontend/user/getQRCode', params, config);
/**
 * 单个商品退款申请
 */
const initiateRefundByGoods = (params = {}, config) => http.post('/frontend/mall/order/refund/initiateRefundByGoods', params, config);
/**
 * 退款页面
 */
const refundAmount = (params = {}, config) => http.post('/frontend/mall/order/refundAmount', params, config);
/**
 * 退款详情
 */
const initiateRefundDetail = (data = {}, config) => http.get('/frontend/mall/order/refund/initiateRefundDetail', {params: data,...config});
/**
 * 用户撤销退款--订单 
 */
const revokeRefundByOrderId = (data = {}, config) => http.get('/frontend/mall/order/refund/revokeRefundByOrderId', {params: data,...config});
/**
 * 用户撤销退款--单个商品
 */
const revokeRefund = (data = {}, config) => http.get('/frontend/mall/order/refund/revokeRefund', {params: data,...config});
/**
 * 用户填写物流信息
 */
const updateInfoLogistics = (params = {}, config) => http.post('/frontend/mall/order/refund/updateInfo', params, config);
/**
 * 物流公司
 */
const logisticsDropDown = (params = {}, config) => http.post('/frontend/mall/logistics/company/dropDowns', params, config);
/**
 * 最近积分可提现日期
 */
const getWithdrawableDate = (data = {}, config) => http.get('/frontend/rattan/getWithdrawableDate', {params: data,...config});
export default {
	getApiL, //get示例接口
	postApiL, //post示例接口
	activityList,//线下活动
	myActivityList,//我的活动
	getActivityInfo,//活动详情
	signUp,//报名活动
	cancelSignUp,//取消报名
	userInfo,//个人信息
	updateInfo,//修改个人信息
	couponCollectionCenter,//领券中心
	myCouponList,//我的优惠券
	receiveCoupon,//领券优惠券
	allProductsList,//首页商品列表
	homeBanner,//首页轮播图
	getAgreement,//隐私协议
	userAgreement,//用户协议
	couponNewPeople,//新人优惠券
	getEstateTypeById,//会员信息
	checkData,//生成合同
	signContract,//合同签订
	payManor,//线上支付
	payOffline,//线下支付
	memberList,//庄园订单列表
	frontendOrderDetail,//订单详情
	frontendList,//退款原因
	initiateRefund,//申请退款
	confirmTakeOver,//确认收货
	getLogisticsInfo,//物流详情
	rattanStatistics,//积分
	withdrawnStatistics,// 个人已提现金额统计
	frontendRattanDetailList,//提现信息
	partIncomeList,//流水收益
	addWithdrawalLog,//积分提现
	getQRCode,//邀请码
	initiateRefundByGoods,//单个商品退款申请
	refundAmount,//退款页面
	initiateRefundDetail,//退款详情
	revokeRefundByOrderId,//用户撤销退款--订单 
	revokeRefund,//用户撤销退款--单个商品
	updateInfoLogistics,//用户填写物流信息
	logisticsDropDown,//物流公司
	getWithdrawableDate,//最近积分可提现日期
	
}